﻿using System;

namespace AirTunesStreamer
{
    class BrowseData
    {
        public uint InterfaceIndex { get; private set; }
        public string Name { get; private set; }
        public string Type { get; private set; }
        public string Domain { get; private set; }

        public BrowseData(uint ifIndex, string serviceName, string regType, string domain)
        {
            InterfaceIndex = ifIndex;
            Name = serviceName;
            Type = regType;
            Domain = domain;
        }

        public override String ToString()
        {
            return Name;
        }

        public override bool Equals(object other)
        {
            BrowseData o = other as BrowseData;
            return Name == o.Name;
        }

        public override int GetHashCode()
        {
            return Name.GetHashCode();
        }
    };
}
